<HTML>
    <HEAD>
        <META HTTP-EQUIV="content-type" CONTENT="text/html;charset=iso-8859-1">
        <TITLE>Executing Quake console commands with AppleScript</TITLE>
        <META NAME="copyright" CONTENT="Copyright 2002 Fruitz Of Dojo. All Rights Reserved.">
        <META NAME="description" CONTENT="Learn about the AppleScript support of Quake.">
</HEAD>

<BODY BGCOLOR="#ffffff"><A NAME="itns1003"></A><A NAME="xicnitn"></A>
<DIV ALIGN="left">
<TABLE WIDTH="352" BORDER="0" CELLSPACING="0" CELLPADDING="0">
    <TR ALIGN="left" VALIGN="top" HEIGHT="20">
        <TD ALIGN="left" VALIGN="top" WIDTH="7" HEIGHT="20">
        </TD>
	<TD ALIGN="left" VALIGN="top" WIDTH="22" HEIGHT="20">
            <IMG SRC="../gfx/quake.gif" ALT="Quake" HEIGHT="16" WIDTH="16">
        </TD>
	<TD ALIGN="left" VALIGN="top" WIDTH="308" HEIGHT="20">
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            <A HREF="../Quake%20Help.html">
            Quake Help
            </A>
            </FONT>
        </TD>
    </TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
    <TR HEIGHT="40">
	<TD VALIGN="middle" WIDTH="7" HEIGHT="40">
        </TD>
	<TD WIDTH="100%" HEIGHT="40">
            <FONT SIZE="4" FACE="Lucida Grande,Helvetica,Arial">
            <B>Executing Quake console commands with AppleScript</B>
            </FONT>
        </TD>
    </TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="7">
    <TR>
	<TD>
            <P>
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            You can execute Quake console commands with the &quot;console&quot; command while Quake is running. The syntax for the &quot;console&quot; command is as follows:<BR>
            <BR>
            console execute String<BR>
            <BR>
            The following example will tell the appication &quot;Quake&quot; to open the map &quot;e1m8&quot;:
            </FONT>
            </P>
        </TD>
    </TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="7" BGCOLOR="#ffffcc">
    <TR VALIGN="top" BGCOLOR="#ffffcc">
	<TD BGCOLOR="#ffffcc" WIDTH="98%">
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            tell application &quot;Quake&quot;<BR>
            &nbsp;&nbsp;&nbsp;&nbsp;console execute &quot;map e1m8&quot;<BR>
            end tell
            </FONT>
        </TD>
    </TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="7">
    <TR>
	<TD>
            <P>
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            You have to separate each command with a semicolon if you want to execute several Quake console commands with a single &quot;console&quot; line. For example:
            </FONT>
            </P>
        </TD>
    </TR>
</TABLE>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="7" BGCOLOR="#ffffcc">
    <TR VALIGN="top" BGCOLOR="#ffffcc">
	<TD BGCOLOR="#ffffcc" WIDTH="98%">
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            tell application &quot;Quake&quot;<BR>
            &nbsp;&nbsp;&nbsp;&nbsp;console execute &quot;toggleconsole;quit&quot;<BR>
            end tell
            </FONT>
        </TD>
    </TR>
</TABLE>
<FONT SIZE="1">&nbsp;</FONT>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="7">
    <TR VALIGN="top">
	<TD ALIGN="left">
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            </FONT>
        </TD>
	<TD ALIGN="right">
            <FONT SIZE="2" FACE="Lucida Grande,Geneva,Arial">
            <A HREF="help:search='AppleScript and Quake' bookID=Quake%20Help">
            Tell me more
            </A>
            </FONT>
        </TD>
    </TR>
</TABLE>
</DIV>
</BODY>
</HTML>